home *** CD-ROM | disk | FTP | other *** search
- unit IEBrowsU;
-
- {$ifdef Windows}
- 'This is for Win32 compilers only'
- {$endif}
- {$ifdef Ver90} { Delphi 2.0x }
- {$define DelphiLessThan3}
- {$define DelphiLessThan4}
- {$endif}
- {$ifdef Ver93} { C++ Builder 1.0x }
- {$define DelphiLessThan3}
- {$define DelphiLessThan4}
- {$endif}
- {$ifdef Ver100} { Delphi 3.0x }
- {$define DelphiLessThan4}
- {$endif}
- {$ifdef Ver110} { C++ Builder 3.0x }
- {$define DelphiLessThan4}
- {$endif}
-
- interface
-
- uses
- {$ifdef DelphiLessThan3}
- OleAuto,
- {$else}
- ComObj,
- {$endif}
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, ExtCtrls;
-
- type
- TForm1 = class(TForm)
- btnAbout: TButton;
- btnEasterEgg: TButton;
- btnWin98: TButton;
- btnBrowse: TButton;
- Label1: TLabel;
- edtURL: TEdit;
- procedure btnBrowseClick(Sender: TObject);
- procedure btnAboutClick(Sender: TObject);
- procedure btnEasterEggClick(Sender: TObject);
- procedure btnWin98Click(Sender: TObject);
- private
- { Private declarations }
- public
- IExplore: Variant;
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.btnBrowseClick(Sender: TObject);
- begin
- IExplore := CreateOleObject('InternetExplorer.Application');
- IExplore.Application.Visible := True;
- IExplore.Navigate(edtURL.Text)
- end;
-
- procedure TForm1.btnAboutClick(Sender: TObject);
- begin
- IExplore := CreateOleObject('InternetExplorer.Application');
- IExplore.Application.Visible := True;
- IExplore.Navigate('res://shdocvw.dll/about.dlg')
- end;
-
- procedure TForm1.btnEasterEggClick(Sender: TObject);
- begin
- IExplore := CreateOleObject('InternetExplorer.Application');
- //Don't need this since Easter Egg comes up in a second (visible) window
- //IExplore.Application.Visible := True;
- IExplore.Navigate('res://shdocvw.dll/wcee.htm',
- TargetFrameName := 'TheWCEE')
- end;
-
- { Windows 98 Easter Egg Instructions
-
- Invoke the Date/Time Properties applet from Control Panel.
- This can be done by invoking Control Panel first, then
- locating the relevant icon and double-clicking it.
- You can also double-click the Clock in your task bar's
- system tray. Alternatively, run one of these command-lines:
-
- COMMAND DATE/TIME
- COMMAND TIMEDATE.CPL
-
- Click on the Time Zone tab
- The next bit relies on some geography knowledge.
- Hold down the Ctrl key and drag Memphis, Egypt and
- drop it on Memphis, Tennessee.
- Now hold down the Ctrl key and drag Memphis, Tennessee and
- drop it on Seattle, USA
-
- If you got the right locations, a window will appear with
- various pictures that come and go, and the credits list
- will scroll by.
-
- There is a soundtrack as well, so turn your speakers up.
-
- You can circumvent all this trickery by making a new
- shortcut on your Windows98 desktop. Make a shortcut with
- a command-line of:
-
- "C:\Windows\Application Data\Microsoft\Welcome\WelData.Exe" You_are_a_real_rascal
-
- Make sure you go back to the properties for this shortcut
- (right-click and choose properties) and set the Run: option
- to say Minimized.
-
- The soundtrack to this Easter Egg is the file
- C:\Windows\Application Data\Microsoft\Welcome\Welcom98.Wav }
- procedure TForm1.btnWin98Click(Sender: TObject);
- var
- WinDir: array[0..MAX_PATH-1] of Char;
- CmdLine: String;
- const
- RelPath = '\Application Data\Microsoft\Welcome\';
- AppName = 'WELDATA.EXE';
- AppParam = 'You_are_a_real_rascal';
- begin
- GetWindowsDirectory(WinDir, MAX_PATH);
- CmdLine := Format('"%s%s%s" %s', [WinDir, RelPath, AppName, AppParam]);
- WinExec(PChar(CmdLine), SW_SHOWMINNOACTIVE);
- end;
-
- end.
-